package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.TravelQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface TravelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Travel travel);

    Travel selectByPrimaryKey(Long id);

    List<Travel> selectAll();

    int updateByPrimaryKey(Travel travel);

    /**
     * 分页及排序
     * @param qo
     * @return
     */
    List<Travel> selectForlist(QueryObject qo);

    /**
     * 改变状态
     * @param travel
     */
    void updateStateById(Travel travel);


    /**
     * 游记搜索
     * @param qo
     * @return
     */
    List<Strategy> selectList(TravelQueryObject qo);

    Travel get(Long id);
}